package com.weijie.relaxed.manager;

import android.content.Context;
import android.content.SharedPreferences;



/** 
 * @author weijie 
 * @version 创建时间：2015年3月19日 上午10:49:12 
 */
public class UserManager {

	public static UserManager instance;
	private static String name;
	private static String pw;
	
	private UserManager() {
		
	}
	public static UserManager getInstance(Context con) {
		if(instance == null) {
			instance = new UserManager();
			SharedPreferences share = con.getSharedPreferences("user", Context.MODE_PRIVATE);
			name = share.getString("username", "");
			pw = share.getString("password", "");
		}
		return instance;
	}
	
	public String getName() {
		if(name!=null) {
			return name;
		}
		else return null;
	}
}
